

/*
 * File:   StreamSurface.h
 * Author: mvdr
 *
 * Created on January 30, 2013, 7:24 PM
 */

#ifndef STREAMSURFACE_H
#define STREAMSURFACE_H

#include "Visualizer.h"
#include "Vector.h"

class StreamSurface: public Visualizer {
   
    float d_x1;
    float d_x2;
    float d_y1;
    float d_y2;
   
    int d_t1;
    int d_t2;
   
    int d_segments;
   
    bool d_setting;
   
    float d_dh;
   
    public:
        StreamSurface();
       
        void draw(float winW, float winH, int t, int slices, int sliceDT);
        void addBegin(float x, float y, int t);
        void addEnd(float x, float y, int t);
       
        void setDH(float dh);
        float getDH() const;

    private:
       
        float interpolate(float v1, float v2, int t);
        bool outOfBounds(Vector2f &vec);

};

#endif  /* STREAMSURFACE_H */

inline void StreamSurface::setDH(float dh) { d_dh = dh; }
inline float StreamSurface::getDH() const { return d_dh; }

